﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BrokerBase.Lib.Policy;

namespace broker.duty.RB
{
    class Class10
    {
        public void Calc1(IPolicyPeriodActing ppa, IDutyActing da)
        {
            if (ppa.Period > 0 && ppa.Period % 2 == 0)
            {
                da.Value = ppa.Amount * 0.1;
            }
        }

        public void Calc1(IPolicyPeriodActing ppa, IDutyActing da)
        {
            if (ppa.SchemePeriodActing.InsurantStates.Contains("身故"))
            {
                IPolicyPeriodActing ppa2=ppa.SchemePeriodActing.GetPolicyPeriodActiing("人保_福禄尊享提前给付重大疾病保险_附");

                double x=ppa2==null?0:ppa2.GetDutyTotalValue("重大疾病保险");

                da.Value = ppa.TotalFee - x;

                ppa.IsCurrentFinish = true;
            }
        }
    }
}
